home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 201-225 / disk_222 / plplot / src / source.zoo / plvsta.c < prev    next >
C/C++ Source or Header  |  1989-05-15  |  920b  |  30 lines

  1. /* Defines a "standard" viewport with seven character heights for   */
  2. /* the left margin and four character heights everywhere else       */
  3.  
  4. #include "plplot.h"
  5.                                                                    
  6. void plvsta()
  7. {
  8.     float xmin, xmax, ymin, ymax;
  9.     float chrdef, chrht, spdxmi, spdxma, spdymi, spdyma;
  10.  
  11.     int level;
  12.  
  13.     glev(&level);
  14.     if (level < 1) fatal("Please call PLSTAR before calling PLVSTA.");
  15.  
  16.     gchr(&chrdef,&chrht);
  17.     gspd(&spdxmi,&spdxma,&spdymi,&spdyma);
  18.  
  19. /*  Find out position of subpage boundaries in millimetres, reduce by */
  20. /*  the desired border, and convert back into normalized subpage */
  21. /*  coordinates */
  22.  
  23.     xmin = dcscx(mmdcx(dcmmx(spdxmi) + 7 * chrht));
  24.     xmax = dcscx(mmdcx(dcmmx(spdxma) - 4 * chrht));
  25.     ymin = dcscy(mmdcy(dcmmy(spdymi) + 4 * chrht));
  26.     ymax = dcscy(mmdcy(dcmmy(spdyma) - 4 * chrht));
  27.  
  28.     plvpor(xmin,xmax,ymin,ymax);
  29. }
  30.